<template>
	<view class="themeItem">
		<view  class="box" v-if="isMore">
			<image class= 'pic' :src="item.pic"  mode="aspectFill"></image>
			<view class="mask">
				{{item.title}}
			</view>
			<view class='tab'>
				{{item.content}}
			</view>
		</view>
		
		<navigator url="/pages/classify/classify"  open-type="reLaunch"  class="box more" v-if="!isMore">
			<image class= 'pic' src="../../common/images/11.webp"  mode="aspectFill"></image>
			<view class="mask">
				<uni-icons type="more" size="30" color="#fff"></uni-icons>
				<view class="text">
					更多
				</view>
			</view>
		</navigator>
	</view>
</template>

<script setup>
	
	import {compareTimestamp} from "../../utils/common.js";
	
	defineProps({
		isMore:{
			type:Boolean,
			default:true
		},
		item:{
			type:Object,
			default(){
				return{
					title:'酸辣粉',
					pic:'../../common/images/14.webp',
					content:'酸辣'
				}
			}
		}
		
	})
</script>

<style lang="scss" scoped>
.themeItem{
	.box{
		height: 320rpx;
		border-radius: 20rpx;
		overflow: hidden;
		position: relative;
		.pic{
			width:100%;
			height: 100%;
			
		}
		.mask{
			width:100%;
			height: 70rpx;
			position: absolute;
			bottom: 0;
			left:0;
			display: flex;
			align-items: center;
			justify-content: center;
			background: rgba(0,0,0,0.2);
			color:#fff;
			font-weight: 600;
			backdrop-filter: blur(5rpx);
			
		}
		
		.tab{
			position: absolute;
			top:0;
			left:0;
			width:65%;
			height: 40rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 22rpx;
			color: #fff;
			background: rgba(250, 125, 90, 0.7);
			backdrop-filter: blur(5rpx);
			border-radius: 0 0 20rpx 0;
			
		}
	}
	
	.box.more{
		.mask{
			height: 100%;
			width: 100%;
			flex-direction: column;
		}
		.text{
			font-size: 28rpx;
		}
	}
	
}
</style>